<?php 
function __autoload($class_name) {
	include $class_name.'.php';
}
?>

<html>
	<head>
		<meta charset="utf-8">
		<title>Офис войни</title>
		<link href="css/indexStyle.css" rel="stylesheet" type="text/css">
		<script src="js/jquery-1.11.1.min.js"></script>
		<script src="js/indexJS.js" charset="utf-8"></script>
	</head>
	<body>
	<div id="mainContainer">
		<div id="leftContent">
		<?php 
			if(isset($_GET['action'])) {
				
				if($_GET['action'] == "registerUser") {

					UserForms::registerForm($_POST);
				}
				
				if($_GET['action'] == "registered") {
				
					echo '<p>Регистрирахте се успешно!</p>';
				}
			} else {
				
				echo '<p>Все още не си се регистрирал?</p>
					  <form method="post" action="index.php?action=registerUser">
			          <button id="register" name="register" class="button">Регистрирай се тук!</button>
					  </form>';
			}
		?>	
		</div>
		<div id="rightContent"> 
			<?php UserForms::loginForm($_POST);?>
		</div>
	</div>
	</body>
</html>